<template>
	<view>
	  <Dynamic v-for="(item,index) in list" key="id" 
	        :imgList="item.imgList" 
	        :avatar="item.avatar"
	        :name="item.name"
	        :publishTime="item.publishTime"
	        :content="item.content"
	        :isLike="item.isLike"
	        :isGiveReward="item.isGiveReward"
	        :likeNumber="item.likeNumber"
	        :giveRewardNumber="item.giveRewardNumber"
	        :chatNumber="item.chatNumber"
	        @clickDynamic="clickDynamic(index)"
	        @clickUser="clickUser(item.id)"
	        @clickFocus="clickFocus(index)"
	        @clickThumbsup="clickThumbsup(item.id)"
	        @clickGiveReward="clickGiveReward(item.id)"
	        @clickChat="clickChat(item.id)">
	    </Dynamic>
		</view>
</template>
<script>
	import Dynamic from '@/components/qizai-dynamic/Dynamic.vue'
	export default {
	    components: {
	        Dynamic
	    },
	    data() {
	        return {
	            title: 'Hello',
	            list:[
	                {
	                    id:1,
	                    avatar:'https://mmbiz.qpic.cn/mmbiz_jpg/SrHhzvpFohLFicYvBORoUwYgrojp5OZOZr7P30ZuyMAEp7nuBJ9Zk1bX3rdM2dxA1KEnrdWeG3jdSYkfTRdSoXg/640?wx_fmt=jpeg&wxfrom=5&wx_lazy=1&wx_co=1',
	                    name:'不许人间见白头',
	                    publishTime:1617086756,
	                    content:'本人肢体残疾四级（左手），22岁男，河北邯郸人，计算机软件专业毕业，想寻找一份关于计算机有关的工作',
	                    imgList:[
	                        'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fss2.meipian.me%2Fusers%2F75944251%2F6779d370-f6a7-11ea-b28b-9f0609797be4.jpg%3Fmeipian-raw%2Fbucket%2Fivwen%2Fkey%2FdXNlcnMvNzU5NDQyNTEvNjc3OWQzNzAtZjZhNy0xMWVhLWIyOGItOWYwNjA5Nzk3YmU0LmpwZw%3D%3D%2Fsign%2Fc318738799ee31b6a917b00dedc0f714.jpg&refer=http%3A%2F%2Fss2.meipian.me&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1684054857&t=cfa0feef5b6febf6c9cbf731e6fbdbcc',
	                    ],
	                    isLike:true,
	                    isGiveReward:true,
	                    likeNumber:2,
	                    giveRewardNumber:2,
	                    chatNumber:2,
	                    isFocusOn:true,
	                },
	
	                {
	                    id:2,
	                    avatar:'https://mmbiz.qpic.cn/mmbiz_jpg/SrHhzvpFohLFicYvBORoUwYgrojp5OZOZYlKXQoFBPWjAAibQ5cKMrpfhzTrOFqJjlkZicbDEL6xMA6dic7TJCkq6Q/640?wx_fmt=jpeg&wxfrom=5&wx_lazy=1&wx_co=1',
	                    name:'曾经沧海难为水',
	                    publishTime:1617036656,
	                    content:'  我也是这种情况，大专在校生，然后想找个手头的网络上这种，比如说配音啦，或者编程啦，经验我有，但是，我也是二级残疾 ',
	                    imgList:[
	                        'https://img-baofun.zhhainiao.com/fs/e2e2d651775319014a0bc01158e20191.jpg',
	                    ],
	                    isLike:false,
	                    isGiveReward:false,
	                    likeNumber:0,
	                    giveRewardNumber:0,
	                    chatNumber:2,
	                    isFocusOn:false,
	                },
	                {
	                    id:3,
	                    avatar:'https://mmbiz.qpic.cn/mmbiz_jpg/SrHhzvpFohLFicYvBORoUwYgrojp5OZOZ5ZHAs7XLmqpQsV6psZfXoLKHtQyDJb0a7dFawM5Z3PKibFwavOtOFiaQ/640?wx_fmt=jpeg&wxfrom=5&wx_lazy=1&wx_co=1',
	                    name:'乾坤未定',
	                    publishTime:1617046556,
	                    content:'  我是听障人 ，除了听不见 ，听力残疾一级，我本是重庆，大专，视觉传播设计的专业，想找做手工啊 ',
	                    imgList:[
	                        'https://img0w.pconline.com.cn/pconline/1306/25/3355684_08.jpg',
	                        'https://img.wowoqq.com/allimg/160823/1-160R3235407-50.jpg',
	                        'https://img0.baidu.com/it/u=1140211245,480231009&fm=253&fmt=auto&app=138&f=JPEG?w=756&h=500',
	                        'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F03395b26-40b8-472e-91f5-819c12b187ba%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1684055629&t=98f96eae0d805d2da464db104598b8bb',
	                        'https://img1.baidu.com/it/u=2817537995,852426914&fm=253&fmt=auto&app=138&f=JPEG?w=828&h=500',
	                    ],
	                    isLike:true,
	                    isGiveReward:false,
	                    likeNumber:4,
	                    giveRewardNumber:22,
	                    chatNumber:52,
	                },
	                {
	                    id:4,
	                    avatar:'https://mmbiz.qpic.cn/mmbiz_jpg/SrHhzvpFohLFicYvBORoUwYgrojp5OZOZicaTLsiaok390R7cCMkD92UTVsGDEjoJehXJS9RHOcSU3xiczwdgInoZg/640?wx_fmt=jpeg&wxfrom=5&wx_lazy=1&wx_co=1',
	                    name:'如果雪山能看见',
	                    publishTime:1616086456,
	                    content:'肢体残疾三级，双手没问题，想在深圳这边找份工作，本人吃苦耐劳',
	                    imgList:[
	                        'https://img2.baidu.com/it/u=3057511305,1114590703&fm=253&fmt=auto&app=138&f=JPEG?w=773&h=462',
	                        'https://s2.best-wallpaper.net/wallpaper/iphone/1901/Beautiful-sunset-lake-sky-clouds-dusk_iphone_1242x2688.jpg',
	                    ],
	                    isLike:true,
	                    isGiveReward:false,
	                    likeNumber:25,
	                    giveRewardNumber:0,
	                    chatNumber:7,
	                },
	                {
	                    id:5,
	                    avatar:'https://mmbiz.qpic.cn/mmbiz_jpg/SrHhzvpFohLFicYvBORoUwYgrojp5OZOZGaOdq6cJib4ziasnQY5S0QyicH1nHSmJ0FIl052c87BwhJa1sIw1Fb72A/640?wx_fmt=jpeg&wxfrom=5&wx_lazy=1&wx_co=1',
	                    name:'月上柳稍头',
	                    publishTime:1607086356,
	                    content:'本人26岁，想找个工作，除了走不行，其他都可以',
	                    imgList:[
	                        'https://img0.baidu.com/it/u=2170044318,3758699051&fm=253&fmt=auto&app=138&f=JPEG?w=281&h=500',
	                        'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fbao%2Fuploaded%2Fi1%2F2312705061%2FO1CN014ds9Sx1nFz1UnG84U_%21%210-item_pic.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1684055777&t=a72228f31315d4ec8992225f301fa1c0',
	                        'https://pic.616pic.com/photoone/00/05/78/618e262492d5b4997.jpg',
	                        'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fss2.meipian.me%2Fusers%2F47568919%2Fc3d0f85fb25f4cf8927afae4f04f24f6.jpg%3Fmeipian-raw%2Fbucket%2Fivwen%2Fkey%2FdXNlcnMvNDc1Njg5MTkvYzNkMGY4NWZiMjVmNGNmODkyN2FmYWU0ZjA0ZjI0ZjYuanBn%2Fsign%2F77ab32e8a7d06b84028dbdd2fc8123d8.jpg&refer=http%3A%2F%2Fss2.meipian.me&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1684055645&t=e5559492c2812c1c5804cf9b02c35756',
	                    ],
	                    isLike:true,
	                    isGiveReward:true,
	                    likeNumber:3,
	                    giveRewardNumber:2,
	                    chatNumber:2,
	                }
	        ]
	        }
	    },
	    methods:{
	        clickDynamic(e){
	            console.log('childDynamic');
	        },
	        // 点击用户信息
	        clickUser(e){
	            console.log(e);
	            console.log('childUser');
	        },
	        // 点击关注
	        clickFocus(e){
	            this.list[e].isFocusOn = this.list[e].isFocusOn ? false : true;
	            console.log(e);
	            console.log('childUser');
	        },
	        // 点赞
	        clickThumbsup(e){
				e.likeNumber+1;
	            console.log(e);
	            console.log('childThumbsup');
	        },
	        // 点击打赏
	        clickGiveReward(e){
	            console.log(e);
	            console.log('clickGiveReward');
	        },
	        // 点击聊天
	        clickChat(e){
	            console.log(e);
	            console.log('clickChat');
	        }
	    }
	}
</script>